<?php

$inc_core = realpath(dirname(__FILE__) . '/../inc/inc_core.inc');
require_once $inc_core;
use teia\webdev\php\core as teia;

$on_login_url = '/';

try {
	$usr_id = 'bernardokibiana@msn.com';
	$usr_pwd = 'Password01';
	
	$user = teia\FunctionPool::get_session_user();
	$pass = $user->login($usr_id, $usr_pwd);
	if ($pass) {
		// log-in successful, go to redirect url
		//header("Location: $on_login_url");
		echo "Location: $on_login_url\n";
	} else {
		echo "Invalid Email/Password\n";
	}
} catch (Exception $e) {
	echo $e->getMessage() .  "-" . $e->getCode() . "\n";
}
?>